package com.turing.service.impl;

import com.turing.domain.RepositoryInfo;
import com.turing.mapper.RepositoryInfoMapper;
import com.turing.service.IRepositoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class RepositoryInfoServiceImpl implements IRepositoryInfoService {

    @Autowired
    private RepositoryInfoMapper repositoryInfoMapper;

    @Override
    public List<RepositoryInfo> selectAll() {
        return repositoryInfoMapper.selectList();
    }

    @Override
    public RepositoryInfo selectById(Long id) {
        return repositoryInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertOne(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.insertSelective(repositoryInfo);
    }

    @Override
    public int updateById(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.updateByPrimaryKeySelective(repositoryInfo);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return repositoryInfoMapper.deleteByPrimaryKey(ids);
    }

    @Override
    public List<RepositoryInfo> selectPage(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.selectPage(repositoryInfo);
    }
}
